27 Validation Rule
What Is It?
For verbatim or numeric fields, validation rules may be set to ensure that survey respondents have entered a valid answer. The validation rules are Regular Expressions which provide a powerful set of comparison features. You may choose to enter your own Regular Expressions into the Validation Rule property field (a useful site for building regular expressions is http://gskinner.com/RegExr/), or you may choose one of the options currently available within Survey Shaper.
Validations Available
(^\d{2}\s?\d{4}\s?\d{4}$)|(^\d{4}\s?\d{3}\s?\d{3}$)|(^13\s?\d{4}$)|(^\d{4}\s?\d{3}\s?\d{3}$)|(^\d{4}\s?\d{4}$)
(^\d{4}\s\d{3}\s\d{3}$)|(^13\s?\d{4}$)|(^\d{4}\s?\d{3}\s\d{3}$)
(^13\d{2}\s\d{3}\s\d{3}$)
(^18\d{2}\s\d{3}\s\d{3}$)
(^13\s?\d{4}$)
(^\d{4}\s\d{3}\s\d{3}$)
(^\(\d{2}\)\s\d{4}\s\d{4}$)
(^\(\d{2}\)\s\d{4}\s\d{4}$)
\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+|(\".+\"))@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$)
(^[-+]?\d\d*[.]\d\d*([e][-+]?\d\d*)?$)|(^[-+]?\d{1,3}([,]\d{3})*([e][-+]?\d\d*)?$)|(^[-+]?\d\d*([e][-+]?\d\d*)?$)
(^[-+]?\d\d*[.]\d{2}$)
(^[-+]?\d\d*$)
(^[-+]?\d\d*$)
^[A-Z]{1})([a-z\-\']*)([ ]{0,1}))+$
(^([A-Z \-\']*)$)
(^([a-z \-\']*)$)
(^([a-zA-Z \-\']*)$)
(^[-+]?[.]\d\d*([e][-+]?\d\d*)?$)|(^[-+]?\d{1,3}([,]\d{3})*([e][-+]?\d\d*)?$)|(^[-+]?\d\d*([e][-+]?\d\d*)?$)
^20000\d\d\d\d\d\d\d\d$
^\d\d\d\d\d\d\-\d\d\d\d\d\d$
^\d\d\d\d$
How Do I Use This?
Validation Rules can be set by selecting the required rule via the drop down list of options in the Properties Pane. This will enter the relevant regular expression into the Validation Rule property field, which can be edited directly if required.
The Max Length property may also be used to restrict the number of characters entered in a verbatim field.